package com.module.oa.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.module.oa.mapper.PerformancestatisticsMapper;
import com.module.oa.domain.Performancestatistics;
import com.module.oa.service.IPerformancestatisticsService;

/**
 * 绩效统计Service业务层处理
 * 
 * @author hezhengxian
 * @date 2023-09-12
 */
@Service
public class PerformancestatisticsServiceImpl implements IPerformancestatisticsService 
{
    @Autowired
    private PerformancestatisticsMapper performancestatisticsMapper;

    /**
     * 查询绩效统计
     * 
     * @param recordId 绩效统计主键
     * @return 绩效统计
     */
    @Override
    public Performancestatistics selectPerformancestatisticsByRecordId(Integer recordId)
    {
        return performancestatisticsMapper.selectPerformancestatisticsByRecordId(recordId);
    }

    /**
     * 查询绩效统计列表
     * 
     * @param performancestatistics 绩效统计
     * @return 绩效统计
     */
    @Override
    public List<Performancestatistics> selectPerformancestatisticsList(Performancestatistics performancestatistics)
    {
        return performancestatisticsMapper.selectPerformancestatisticsList(performancestatistics);
    }

    /**
     * 新增绩效统计
     * 
     * @param performancestatistics 绩效统计
     * @return 结果
     */
    @Override
    public int insertPerformancestatistics(Performancestatistics performancestatistics)
    {
        performancestatistics.setCreateTime(DateUtils.getNowDate());
        return performancestatisticsMapper.insertPerformancestatistics(performancestatistics);
    }

    /**
     * 修改绩效统计
     * 
     * @param performancestatistics 绩效统计
     * @return 结果
     */
    @Override
    public int updatePerformancestatistics(Performancestatistics performancestatistics)
    {
        performancestatistics.setUpdateTime(DateUtils.getNowDate());
        return performancestatisticsMapper.updatePerformancestatistics(performancestatistics);
    }

    /**
     * 批量删除绩效统计
     * 
     * @param recordIds 需要删除的绩效统计主键
     * @return 结果
     */
    @Override
    public int deletePerformancestatisticsByRecordIds(Integer[] recordIds)
    {
        return performancestatisticsMapper.deletePerformancestatisticsByRecordIds(recordIds);
    }

    /**
     * 删除绩效统计信息
     * 
     * @param recordId 绩效统计主键
     * @return 结果
     */
    @Override
    public int deletePerformancestatisticsByRecordId(Integer recordId)
    {
        return performancestatisticsMapper.deletePerformancestatisticsByRecordId(recordId);
    }
}
